package com.gulimall.seckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@EnableScheduling
@EnableAsync
public class HelloSchedule {

    //秒 分 时 日 月 周
    @Async  //spring的异步执行
    //@Scheduled(cron = "*/10 * * * * ?")
    public void hello(){
        log.info("开始定时任务 hello....");
    }












}
